# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-cma
_pkgorig=cma
pkgver=4.0.0
pkgrel=0
pkgdesc="Python implementation of CMA-ES"
url="https://github.com/CMA-ES/pycma"
arch="noarch"
license="BSD-3-Clause"
depends="
	python3
	py3-matplotlib
	py3-numpy
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/c/cma/cma-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH=build/lib python3 -c "import cma"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
74490df327fdd4a5eb0a1ca94d034a9a0e9528b80f56d0d40379e2eda936a8966d64680e734ad8a51c0b977a456b20fdb81110f9c775e2337a43fba1106eedf2  py3-cma-4.0.0.tar.gz
"
